<?php
// +----------------------------------------------------------------------
// | [ 简单 高效 卓越 ]
// +----------------------------------------------------------------------
// | Copyright (c) 2016 http://www.lingyun.net All rights reserved.
// +----------------------------------------------------------------------
// | Author: jry <598821125@qq.com>
// +----------------------------------------------------------------------
namespace Admin\Model;

use Common\Model\ModelModel;

class LogoModel extends ModelModel
{
	/**
     * 数据库表名
     * @author jry <598821125@qq.com>
     */
    protected $tableName = 'admin_logo';
	
	/**
     * 自动验证规则
     * @author jry <598821125@qq.com>
     */
    protected $_validate = array(
        //验证品牌名称
        array('name', 'require', '导航名称不能为空', self::MUST_VALIDATE, 'regex', self::MODEL_BOTH),
		//验证品牌名称
        array('img_id', 'require', '请上传导航图', self::EXISTS_VALIDATE, 'regex', self::MODEL_BOTH),
        //验证品牌名称
        array('name', '', '导航名称已存在', self::MUST_VALIDATE, 'unique', self::MODEL_BOTH),

    );

	public function shanchu(){

		return $result=$this->where('id='.$_GET['id'])->delete();
	
	}
	
}